home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / c / appsource.lha / APlusPlus / GNUC++ / maketst < prev    next >
Encoding:
Text File  |  1994-08-03  |  1.9 KB  |  73 lines

  1. #
  2. # This script creates a makefile for A++ to be executed
  3. # with GNUMake and the GNU/C++ Development System.
  4. #
  5.  
  6. # open the output file
  7. echo "Creating GNU 'makefile'.."
  8. rm makefile
  9. open makefile w 1
  10.  
  11. echo "#"^j\
  12. "# GNU Makefile for the A++ Test programs"^j\
  13. "# Copyright (C)1994 by Armin Vogt"^j\
  14. "#"^j\
  15. "# This makefile has been created automatically with 'maketst'"^j\
  16. "# "$Id: maketst,v 1.2 1994/08/02 18:58:28 Armin_Vogt Exp Armin_Vogt $^j\
  17. "#"^j^j\
  18. "TESTPRGS        =      /apphome/TESTPRGS/"^j\
  19. "APPINCLUDE      =      /appinclude/"^j\
  20. ^j"#"^j"# if the Commodore® headers are not present in gcc:os-include"^j\
  21. "# define their path here.."^j\
  22. "CHEADERS        =      /include"^j\
  23. ""^j\
  24. ""^j\
  25. "CC      =  g++"^j\
  26. "CFLAGS  =  -O2"^j\
  27. ^j\
  28. "LIBNAME    =    aplusplus"^j\
  29. "LIBDIR     = /apphome/gnuc++/APPlibrary"^j\
  30. "LOADLIBES = -L$(LIBDIR) -l$(LIBNAME) -lauto"^j^j\
  31. "ERRORPIPE  =  pipe:gnu_errors"^j\
  32. ""^j\
  33. ""^j >.1
  34.  
  35.  
  36. alias ALL        "*p%c exec set p $p; foreach s ( $p ) $c"
  37.  
  38. #
  39. # IMPORTANT NOTE: GNU Make demands a tab character leading each
  40. # action line!! '^i' prints a tab.
  41. #
  42.  
  43. echo "COMPILE = $(CC) -c -I/gcc/include -I$(APPINCLUDE) -I$(CHEADERS) $(CFLAGS) $< >$(ERRORPIPE)"^j >.1
  44.  
  45. echo ^j"# The order of include directory declarations in crucial when"^j\
  46. "# CHEADERS is used. GNU standard headers must have a higher priority"^j\
  47. "# than the ones in the CHEADERS (usually SAS standard headers!!)"^j >.1
  48.  
  49.  
  50.  
  51.  
  52. echo "Making TESTPRG dependencies.."
  53.  
  54. #
  55. # create testprg dep.: all files present in the TESTPRGS sub-directories
  56. # are included.
  57. #
  58.  
  59. cd apphome:testprgs
  60. unset file
  61. unset path
  62. echo ^j"all: \\" >.1
  63. ALL */*.cxx "strhead path .cxx $s;strtail file / $path;echo \" \"$file\\\\" >.1
  64. unset file
  65. unset path
  66. echo ^j >.1
  67. ALL */*.cxx "strhead path .cxx $s;strtail file / $path;echo ^j"$file: $file.o"^j^j"$file.o:  "\"$\""(TESTPRGS)$path.cxx"^j^i\"$\""(COMPILE)"  >.1
  68. dswap
  69.  
  70. # close created output file
  71. close 1
  72. echo "done."
  73.